﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WorkItemRSS.Protected
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string Path = Request.Url.AbsoluteUri.Substring(0, Request.Url.AbsoluteUri.ToLower().LastIndexOf("/protected") + 1);
                string LogonUserIdentityName = Request.LogonUserIdentity.Name; ;
                string strUsername = LogonUserIdentityName.Substring(LogonUserIdentityName.IndexOf("\\") + 1);
                string WorkItemRSSPath = Path + "WorkItemRSS.ashx?LogonUser=" + strUsername;
                string TelecoRequirementRSS = Path + "TelecoRequirementRSS.ashx?LogonUser=" + strUsername;

                string OutPut = "<br /><br /><br />Kindly use this URL for all TFS all work items types:<br />";
                OutPut += "<a href=\"" + WorkItemRSSPath + "\">";
                OutPut += WorkItemRSSPath + "</a>";
                OutPut += "<br />use this URL for Teleco-Requirement only:<br />";
                OutPut += "<a href=\"" + TelecoRequirementRSS + "\">";
                OutPut += TelecoRequirementRSS + "</a>";

                contenct.InnerHtml = OutPut;
               
            }
        }
    }
}